// Fill out your copyright notice in the Description page of Project Settings.

#include "RPG.h"
#include "UsableActor.h"


AUsableActor::AUsableActor(const FObjectInitializer& ObjectInitializer)
	: Super(ObjectInitializer)
{
	Mesh = ObjectInitializer.CreateDefaultSubobject<class UStaticMeshComponent>(this, TEXT("Mesh"));
	RootComponent = Mesh;
}

bool AUsableActor::OnUsed_Implementation(ACharacter* character) {
	return false;
}

void AUsableActor::BeginFocus_Implementation()
{
	UPrimitiveComponent* comp = (UPrimitiveComponent *) RootComponent;
	comp->SetRenderCustomDepth(true);
	comp->MarkRenderStateDirty();
}

void AUsableActor::EndFocus_Implementation()
{
	UPrimitiveComponent* comp = (UPrimitiveComponent *)RootComponent;
	comp->SetRenderCustomDepth(false);
	comp->MarkRenderStateDirty();
}

